TTTTccccllll____DDDDeeeettttaaaacccchhhhPPPPiiiiddddssss and TTTTccccllll____RRRReeeeaaaappppDDDDeeeettttaaaacccchhhheeeeddddPPPPrrrrooooccccssss provide a mechanism |
for managing subprocesses that are running in background. |
These procedures are needed because the parent of a process |
must eventually invoke the wwwwaaaaiiiittttppppiiiidddd kernel call (or one of a |
few other similar kernel calls) to wait for the child to |
exit. Until the parent waits for the child, the child's |
state cannot be completely reclaimed by the system. If a |
parent continually creates children and doesn't wait on |
them, the system's process table will eventually overflow, |
even if all the children have exited. |
TTTTccccllll____DDDDeeeettttaaaacccchhhhPPPPiiiiddddssss may be called to ask Tcl to take |
responsibility for one or more processes whose process ids |
are contained in the _p_i_d_P_t_r array passed as argument. The |
caller presumably has started these processes running in |
background and doesn't want to have to deal with them again. |
TTTTccccllll____RRRReeeeaaaappppDDDDeeeettttaaaacccchhhheeeeddddPPPPrrrrooooccccssss invokes the wwwwaaaaiiiittttppppiiiidddd kernel call on |
each of the background processes so that its state can be |
cleaned up if it has exited. If the process hasn't exited |
yet, TTTTccccllll____RRRReeeeaaaappppDDDDeeeettttaaaacccchhhheeeeddddPPPPrrrrooooccccssss doesn't wait for it to exit; it |
will check again the next time it is invoked. Tcl |
automatically calls TTTTccccllll____RRRReeeeaaaappppDDDDeeeettttaaaacccchhhheeeeddddPPPPrrrrooooccccssss each time the eeeexxxxeeeecccc |
command is executed, so in most cases it isn't necessary for |
any code outside of Tcl to invoke TTTTccccllll____RRRReeeeaaaappppDDDDeeeettttaaaacccchhhheeeeddddPPPPrrrrooooccccssss. |
However, if you call TTTTccccllll____DDDDeeeettttaaaacccchhhhPPPPiiiiddddssss in situations where the |
eeeexxxxeeeecccc command may never get executed, you may wish to call |
TTTTccccllll____RRRReeeeaaaappppDDDDeeeettttaaaacccchhhheeeeddddPPPPrrrrooooccccssss from time to time so that background |